package com.yeban.factory.simple;

/**
 * @Desc TODO
 * @Author yeban
 * @Date 2025/11/24
 */
public class SimpleCoffeeFactory {

    public Coffee createCoffee(String type) {
        Coffee coffee = null;
        if("Latte".equals(type)) {
            coffee = new Latte();
        } else if("Americano".equals(type)) {
            coffee = new Americano();
        } else if("Cappuccino".equals(type)) {
            coffee = new Cappuccino();
        } else {
            System.out.println("不好意思！没有这种咖啡");
        }
        return coffee;
    }
}
